package com.zan.rocketmqbootconsumer.listener;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author Zan
 * @Create 2024/8/30 10:24
 * @ClassName: DC2
 * @Description : TODO 请用一句话描述该类的功能
 */
@Component
@RocketMQMessageListener(
        topic = "modelTopic",
        consumerGroup = "model-consumer-group-a",
        messageModel = MessageModel.CLUSTERING // 集群模式
)
public class DC2 implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("我是model-consumer-group-a这个组的第二个消费者：" + message);
    }
}
